<?php $this->load->view('headerfooter/header'); ?>
<!-- Begin page content -->
<script src="<?=base_url()?>/src/js/parsley.js"></script>
<div class="container">
	<div class="col-sm-4 col-sm-offset-1">
		<div class="panel panel-success">
			<div class="panel-heading">
				<div class="panel-title">
					<div class="title-white"><?=$title?></div>
				</div>
			</div>
			<div class="panel-isi">
				<?php if(!isset($message))$message = $this->session->flashdata('message'); ?>
				<?php if($message != null):?>
					<div class="alert alert-warning">
						<button type="button" class="close" data-dismiss="alert">&times;</button>
						<?=$message?>
					</div>
				<?php endif; ?>
				<form method="post" action="<?=site_url('user/changePassword')?>" data-parsley-validate>
					<table class="table">
							<input type="hidden" name="id" value="<?=$id?>">
							<tr>
								<th width="20%">Password Lama</th>
								<td><input type="password" name="pwd-lama" class="form-control" required></td>
							</tr>
							<tr>
								<th width="20%">Password Baru</th>
								<td><input id="pwd-baru" type="password" name="pwd-baru" class="form-control" data-parsley-equalto="#konfirm-pwd" required></td>
							</tr>
							<tr>
								<th width="20%">Konfirmasi Password Baru</th>
								<td><input type="password" id="konfirm-pwd" class="form-control" data-parsley-equalto="#pwd-baru"></td>
							</tr>
					</table>
					<button type="submit" class="btn btn-lg btn-primary btn-block"><i class="fa fa-lock"></i> Ubah Password</button>
				</form>
			</div>
		</div>
	</div>
</div>
<?php $this->load->view('headerfooter/footer'); ?>
